package com.axjy.service.impl;

import com.axjy.dao.RoleMapper;
import com.axjy.pojo.Role;
import com.axjy.service.RoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by l on 2018/1/4.
 */
@Service("roleService")
@Transactional
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<Role> getAll() {
        List<Role> list=roleMapper.getAll();
        return list;
    }

    @Override
    public void addRole(Role role) {
        roleMapper.addRole(role);
    }
}
